package liurong.driver.rmi;

import java.rmi.Naming;
import java.rmi.Remote;

public class Consumer {
	public static void main(String[] args) throws Exception {
		Remote lookup = Naming.lookup("rmi://127.0.0.1:8888/Test");
		long start = System.currentTimeMillis();
		if (lookup instanceof TestService) {
			TestService testService = (TestService) lookup;
			for (int i = 0; i < 100000; i++) {
				System.out.println(testService.test1());
			}
		}
		long end = System.currentTimeMillis();
		System.out.println((end - start) / 1000);
	}
}
